package com.example.boke.config;

import com.example.boke.model.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ResponseBody;

@ResponseBody
@ControllerAdvice
@Slf4j
public class ExceptionHandle {
    public Result handle(Exception e){
      log.error("发生异常,e",e);
      return Result.fail("内部错误,请联席管理员");
    }

}
